package com.quectel.util.http;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;

/**
 * 检测url是否可以连通
 *
 * @author caolu
 * @email louis.cao@quectel.com
 */
public class HttpCheckUtils {

    public static boolean isNormalHttpUrl(String url) {
        try {
            HttpRequest get = HttpUtil.createGet(url);
            get.setConnectionTimeout(3000);
            get.execute();
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
